Text Display Data Structure
The
TextDisplayData
structure contains formatting information for a text sample. When the text export component exports a text sample, it uses the information in this structure to generate the appropriate text descriptors for the sample. Likewise, when the text import component imports a text sample, it sets the appropriate fields in the text display data structure based on the sample's text descriptors.
struct TextDisplayData {
long displayFlags;
long textJustification;
RGBColor bgColor;
Rect textBox;
short beginHilite;
short endHilite;
RGBColor hiliteColor;
Boolean doHiliteColor;
SInt8 filler;
TimeValue scrollDelayDur;
Point dropShadowOffset;
short dropShadowTransparency;
};
typedef struct TextDisplayData TextDisplayData;
-
displayFlags
-
Contains flags that represent the values of the following text descriptors:
doNotDisplay
,
doNotAutoScale
,
clipToTextBox
,
useMovieBackColor
,
shrinkTextBox
,
scrollIn
,
scrollOut
,
horizontalScroll
,
reverseScroll
,
continuousScroll
,
flowHorizontal
,
dropShadow
,
anti-alias
,
keyedText
,
inverseHilite
,
continuousKaraoke
, and
textColorHilite
. For more information on the text sample display flags,
see "Movie Toolbox," in this Reference guide and the description of the
TextMediaAddTextSample
function in
Inside Macintosh: QuickTime
.
-
textJustification
-
Specifies the alignment of the text in the text box. Possible values are
teFlushDefault
,
teCenter
,
teFlushRight
, and
teFlushLeft
. For more information on text alignment and the text justification constants, see the "TextEdit" chapter of
Inside Macintosh: Text
.
-
bgColor
-
Specifies the background color of the rectangle specified by the
textBox
field. The background color is specified as an RGB color value.
-
textBox
-
Specifies the rectangle of the text box.
-
beginHilite
-
Specifies the one-based index of the first character in the sample to highlight.
-
endHilite
-
Specifies the one-based index of the last character in the sample to highlight.
-
doHiliteColor
-
Specifies whether to use the color specified by the
hiliteColor
field for highlighting. If the value of this field is
true
, the highlight color is used for highlighting. If the value of this field is
false
, reverse video is used for highlighting.
-
filler
-
Reserved.
-
scrollDelayDur
-
Specifies a scroll delay. The scroll delay is specified as the number of units of delay in the text track's time scale. For example, if the time scale is 600, a scroll delay of 600 causes the sample text to be delayed one second. In order for this field to take effect, scrolling must be enabled.
-
dropShadowOffset
-
Specifies an offset for the drop shadow. For example, if the point specified is (3,4), the drop shadow is offset 3 pixels to the right and 4 pixels down. In order for this field to take effect, drop shadowing must be enabled.
-
dropShadowTransparency
-
Specifies the intensity of the drop shadow as a value between 0 and 255. In order for this field to take effect, drop shadowing must be enabled.
© 1997 Apple Computer, Inc.| Previous | Chapter contents | Chapter top | Section top | Next |